﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Serialization;
using System.IO;

namespace PHP.Koc_Tomo.Testing
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {

            var b = new System.Xml.Serialization.XmlSerializer(typeof(List<person>), new XmlRootAttribute("persons"));

            byte[] byteArray = Encoding.ASCII.GetBytes("<persons><person><name>pero</name><surname>peric</surname></person><person><name>stefko</name><surname>stefic</surname></person></persons>");
            MemoryStream stream = new MemoryStream( byteArray );

            var c = b.Deserialize(stream);

            string a = Requests.GET("http://www.24sata.hr");
            MessageBox.Show(a);
        }
    }
}
